﻿<Framework:SmartViewBase xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                         xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:Framework="clr-namespace:SmartMusicBox.Framework"
                         xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                         xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
                         xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                         xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                         xmlns:SmartMusicBox_ViewModel="clr-namespace:SmartMusicBox.ViewModel"
                         x:Class="SmartMusicBox.View.PlayerPage"
                         mc:Ignorable="d"
                         d:DesignWidth="480"
                         d:DesignHeight="768"
                         FontFamily="{StaticResource PhoneFontFamilyNormal}"
                         FontSize="{StaticResource PhoneFontSizeNormal}"
                         Foreground="{StaticResource PhoneForegroundBrush}"
                         SupportedOrientations="Portrait"
                         Orientation="Portrait"
                         shell:SystemTray.IsVisible="True"
                         DataContext="{Binding PlayerPage, Source={StaticResource Locator}}">

    <StackPanel>
        <StackPanel.Background>
            <ImageBrush ImageSource="../PlayerPage.jpg" />
        </StackPanel.Background>

        <StackPanel Height="175"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center">
            <TextBlock x:Name="ChannelName"
                       TextWrapping="Wrap"
                       DataContext="{Binding CurrentSong}"
                       Text="{Binding ChannelName}"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Center"
                       FontSize="96"
                       FontFamily="Verdana"
                       FontWeight="Bold">
				<TextBlock.Foreground>
					<LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
						<GradientStop Color="Black"
                                      Offset="0" />
						<GradientStop Color="#FFA1FFC0"
                                      Offset="1" />
					</LinearGradientBrush>
				</TextBlock.Foreground>
            </TextBlock>
            <TextBlock x:Name="PlayTime"
                       TextWrapping="Wrap"
                       DataContext="{Binding CurrentSong}"
                       Text="{Binding PlayTime}"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Margin="0,13,0,0"
                       FontSize="32"
                       Foreground="#FFE59393" />
        </StackPanel>
        <StackPanel Height="400">

            <Image x:Name="AlubmImage"
                   DataContext="{Binding CurrentSong}"
                   Source="{Binding Picture}"
                   Stretch="Fill"
                   Opacity="1"
                   Height="350" />
        </StackPanel>
        <StackPanel Height="100"
                    HorizontalAlignment="Center">
            <TextBlock TextWrapping="Wrap"
                       FontFamily="Verdana"
                       DataContext="{Binding CurrentSong}"
                       Text="{Binding SongInfo}"
                       Foreground="#FF1F7E44" />
        </StackPanel>
        <StackPanel Width="200"
                    Height="90"
                    Orientation="Horizontal"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center">
            <Image Height="40"
                   Name="play"
                   Width="40"
                   Margin="12,12,12,12"
                   Source="{Binding ButtonResource.PlaySource}">

                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Tap">
                        <cmd:EventToCommand Command="{Binding PlayCommand}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Image>
            <Image Name="next"
                   Height="40"
                   Width="40"
                   Margin="12,12,12,12"
                   Source="{Binding ButtonResource.NextSource}">

                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Tap">
                        <cmd:EventToCommand Command="{Binding NextCommand}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Image>
        </StackPanel>
    </StackPanel>
</Framework:SmartViewBase>